package cn.itsource.test.sand.demo;

import lombok.extern.slf4j.Slf4j;

/**
 * @author : 张金铭
 * @description :
 * @create :2023-04-18 10:00:00
 */
@Slf4j
public class ThreadDemo implements Runnable{


    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            final String name = Thread.currentThread().getName();
            System.out.println(name + " 执行了：HelloWOrld==>"+i);
        }

        try {
            System.out.println(Thread.currentThread().getName()+"---睡眠了");
            Thread.sleep(10000000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
    }



}


